package com.lin.fengxiu.model;

import javax.persistence.*;

/**
 * @ClassName ThemeSpu
 * @Description TODO
 * @Author wushaopei
 * @Date 2021/3/17 22:33
 * @Version 1.0
 */
@Entity
@Table(name = "theme_spu", schema = "fengxiu", catalog = "")
public class ThemeSpu {
    private Integer id;
    private Integer themeId;
    private Integer spuId;

    @Id
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "theme_id")
    public Integer getThemeId() {
        return themeId;
    }

    public void setThemeId(Integer themeId) {
        this.themeId = themeId;
    }

    @Basic
    @Column(name = "spu_id")
    public Integer getSpuId() {
        return spuId;
    }

    public void setSpuId(Integer spuId) {
        this.spuId = spuId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ThemeSpu themeSpu = (ThemeSpu) o;

        if (id != null ? !id.equals(themeSpu.id) : themeSpu.id != null) return false;
        if (themeId != null ? !themeId.equals(themeSpu.themeId) : themeSpu.themeId != null) return false;
        if (spuId != null ? !spuId.equals(themeSpu.spuId) : themeSpu.spuId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (themeId != null ? themeId.hashCode() : 0);
        result = 31 * result + (spuId != null ? spuId.hashCode() : 0);
        return result;
    }
}
